package com.rp.configure.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author vicente
 * @since 2021-07-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="DeviceAttribute对象", description="")
public class DeviceAttribute extends Model<DeviceAttribute> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "设备id")
    private String deviceId;
    @ApiModelProperty(value = "设备名称")
    @TableField(exist = false)
    private String deviceName;
    @ApiModelProperty(value = "操作id")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String operationId;
    @ApiModelProperty(value = "操作名称")
    @TableField(exist = false)
    private String operationName;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "类型属性id")
    private String deviceTypeAttribute;
    @ApiModelProperty(value = "svgId")
    private String svgId;
    @ApiModelProperty(value = "属性名称")
    @TableField(exist = false)
    private String attributeName;
    @ApiModelProperty(value = "值的级别")
    @TableField(exist = false)
    private Integer rank;
    @ApiModelProperty(value = "网关接口")
    private String gatewayLine;
    @ApiModelProperty(value = "网关接口名称")
    @TableField(exist = false)
    private String gatewayLineName;
    @ApiModelProperty(value = "值")
    private String value;
    @ApiModelProperty(value = "警报规则id")
    private String alarmId;
    @ApiModelProperty(value = "警报规则名称")
    @TableField(exist = false)
    private String alarmName;
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime updateValueTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
